var pageRequest;
var pageIndex = 0;
var pageCapacity = 10;
(function() {
	$(window).scroll(function() {
		var documentHeight = $(document).height();
		var windowHeight = $(window).height();
		var scrollHeight = $(document).scrollTop();
		if (windowHeight + scrollHeight >= documentHeight) {
			pageRequest(++pageIndex, pageCapacity);
		}
	})
})();